using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace YuYuKiCms.Dal.Interface
{
    public interface IBaseRepository<T> where T : class, new()
    {
        T GetId<TKey>(TKey id);
        void InsertOrUpdate<TKey>(T model, TKey id);
        void Delete(T model);
        IEnumerable<T> GetAll(Expression<Func<T, bool>> isValid = null);
        void SaveChange();
    }
}